package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.service.InterventionService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("/intervention")
public class InterventionController {

    @Reference
    private InterventionService interventionService;

    @RequestMapping("/findIntervention.do")
    public Result findIntervention(Integer orderId){
        //获取前端传入的数据
        try{
            Result result = interventionService.findIntervention(orderId);
            return new Result(true,"查询数据成功",result);
        }catch (Exception e){
            return new Result(false,"返回数据失败");
        }
    }

}
